<template>
  <view :class="devtools==='ios'?'payment payment-ios':'payment'">
    <view class="payment-total">
      合计：￥
      <text>{{ price * number }}</text>
    </view>
    <button class="payment-button" @click="ticketOrder">前往支付</button>
  </view>
</template>
<script>
import { get } from '@utils/storage'
export default {
  props: {
    price: {
      type: String,
      default: null
    },
    number: {
      type: Number,
      default: null
    }
  },
  computed: {
    devtools() {
      return get('devtools')
    }
  },
  methods: {
    ticketOrder() {
      this.$emit('ticketOrder')
    }
  }
}
</script>
<style>
/* 支付按钮 */
.payment {
  position: fixed;
  bottom: 0;
  z-index: 99;
  width: 750rpx;
  height: 120rpx;
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
}
.payment-ios {
  height: 186rpx;
}
.payment-total {
  margin-left: 50rpx;
  margin-top: 36rpx;
  font-size: 28rpx;
}
.payment-total > text {
  font-weight: 700;
  font-size: 32rpx;
}
.payment-button {
  margin: 0;
  padding: 0;
  margin-top: 20rpx;
  margin-right: 30rpx;
  background-color: #306de9;
  font-size: 32rpx;
  color: #ffffff;
  font-weight: 700;
  width: 240rpx;
  height: 80rpx;
  text-align: center;
  line-height: 80rpx;
}
</style>
